#include "Liquid.h"
#include "Entity.h"
#include "..\\..\\SGD Wrappers\\SGD_Geometry.h"

Liquid::Liquid(int damage)
{
	SetID(LIQUID);
	iDamage = damage;
}


Liquid::~Liquid()
{
}

int Liquid::Update(float dt)
{
	if (fDamageTimer > 0.0f)
		fDamageTimer -= dt;

	StationaryObject::Update(dt);

	return 0;
}

void Liquid::Render()
{
	if (IsOnCamera())
		GameObject::Render();
}

void Liquid::HandleCollision(const GameObject* collision)
{
	if (dynamic_cast<const Entity*>(collision) != nullptr)
		fDamageTimer = 0.25f;
}

int Liquid::GetDamage() const
{
	return iDamage;
}

float Liquid::GetDamageTimer() const
{
	return fDamageTimer;
}